This function, like gen-random-select, simulates a process found in realtime algorithmic applications such as M, Jam, Fingers and Midi-Axe. When a melody pattern is looped with a matching rhythmic figure:
'(a b f) '(1/8 1/8 1/16)
r
Two possible rhythmic variants are possible by applying a rest event to either pitch or rhythm. In the first (here marked r) the symbol 'f is silent for a '1/16 producing '(a b =) and '(1/8 1/8 -1/16).
'(a b f) '(1/8 1/8 1/16)
R
In the second (here marked R) the symbols rotate through the '(1/8 1/8 -1/16) to produce '(a b = f a = b f = a b = etc)
The function gen-rotate simulates this second rhythmic variant by generating the appropriate symbol pattern.
(gen-rotate nil '(a b f))
--> (a b = f a = b f =)
The rotation point defaults to selecting the last symbol in the symbol-pattern and replacing it with a rest-symbol.
There is an optional rotation-point-position allowing the rotation point and rest-symbol to be placed anywhere in the symbol-pattern.